From: Eric Huss Date: Fri, 20 Oct 2017 23:59:32 +0000 (-0700) Subject: Don't change order of tests and benches for cleaner diff. X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~5^2~22^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=efc0dd1b070f5ca61bd2641c6c9b5440842bdc36;p=cargo.git Don't change order of tests and benches for cleaner diff. --- diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index 2aabb150b..bd89fcc34 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -652,14 +652,6 @@ fn generate_targets<'a>(pkg: &'a Package, pkg, bins, "bin", Target::is_bin, profile)?); targets.append(&mut propose_indicated_targets( pkg, examples, "example", Target::is_example, profile)?); - // If --benches was specified, add all targets that would be - // generated by `cargo bench`. - let bench_filter = match benches { - FilterRule::All => Target::benched, - FilterRule::Just(_) => Target::is_bench - }; - targets.append(&mut propose_indicated_targets( - pkg, benches, "bench", bench_filter, bench_profile)?); // If --tests was specified, add all targets that would be // generated by `cargo test`. let test_filter = match tests { @@ -668,6 +660,14 @@ fn generate_targets<'a>(pkg: &'a Package, }; targets.append(&mut propose_indicated_targets( pkg, tests, "test", test_filter, test_profile)?); + // If --benches was specified, add all targets that would be + // generated by `cargo bench`. + let bench_filter = match benches { + FilterRule::All => Target::benched, + FilterRule::Just(_) => Target::is_bench + }; + targets.append(&mut propose_indicated_targets( + pkg, benches, "bench", bench_filter, bench_profile)?); targets } };